#include <iostream>
#include<thread>
#include<unistd.h>

void thread_run()
{
    while(true)
    {
        std::cout<<"我是新线程。。。"<<std::endl;
        sleep(1);
    }
}
int main()
{
    std::thread t1(thread_run);

    while(true)
    {
        sleep(1);
        std::cout<<"我是主线程。。。"<<std::endl;
    }

    t1.join();
    return 0;
}